The Internet allows people to access resources (e.g., web pages) from remote servers located around the world. These resources are often received from intermediary web cache devices rather than from the web servers which host the resources. Web caching allows users to access resources faster and eases load burdens on web servers.
For example, a user can submit a request using a web browser to a map service identified by the uniform resource locator (URL) “http://maps.google.com”. The map service can have a client user interface that is available in numerous natural languages, such as English, French, Spanish, and so on. All of the different languages in which the service is provided are accessible through the same URL (i.e., “http://maps.google.com”). A caching device receives the request from the user's browser and forwards the request to a web server. The web server can determine a language of its response based on information contained in a field in the hypertext transfer protocol (HTTP) header of the user's request, such as an ‘Accept-Language’ header field. The Accept-Language header field specifies the preferred language of the user. The web server's response to the caching device includes information in the natural language specified by the Accept-Language header field. The web server also includes a language code defining which natural language is specified. This information is included in the response because the value of the Accept-Language header originates from the client device's browser program. A resource displayed or service run on the client device may not obtain this information from the browser directly, and thus may obtain the preferred natural language information from the server.
The web server can also, in its response, include a value in an HTTP header field, such as the ‘Vary’ header field, which can direct the caching device to cache the information in the response according to not only the URL of the request but also the language specified in the Accept-Language header field of the response. However, if the caching device does not properly interpret Vary fields, the caching device may not cache the response resource. On the other hand, if the server does not include the Vary field value, any user requesting the same URL will receive the previously cached English version of the information rather than a version of the information that is correct for their language.